import 'package:flutter/material.dart';
import '../pages/home.dart';
import '../pages/detail.dart';

class RouterManageConfig extends StatefulWidget {
  const RouterManageConfig({ super.key });

  @override
  _RouterManageConfig createState() => _RouterManageConfig();
}

class _RouterManageConfig extends State<RouterManageConfig> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      routes: {
        '/': (context) => const HomePage(), // 地址必须要有一个 / 它是默认地址
        "/detail": (context) => const DetailPage(),
      } ,
    );
  }
}